std: make a lot of items crate private - #161612
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
af7af07 to
a6a436d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Sure. Please no more obscure platform failures, please no more obscure platform failures, please no more obscure platform failures, please no more obscure platform failures... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
69a1881 to
21fd14f
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
So, I forgot to say the verdict from our meeting yesterday, which is everyone is cool with me making the call on this as a reviewer. We do have this turned on for core and alloc, so, I think it would be fine to keep the lint enabled here but maybe explicitly allow the lint for the Feel free to also allow the lint for any modules you find particularly annoying. We seem to have a standard of trying to keep it on by default and just allowing it for annoying bits. |
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
It's alive!!! |
|
So, you still have a few changes inside the |
|
Right now I see them as "it was improved, but it is not enforced by clippy". I can probably go though a few iterations of whack-a-mole and enforce some more of them if you think its worth it. Probably tomorrow or something. |
|
I mostly mention it in the sense of, I figure if we're going to allow the lint for these modules, we probably shouldn't commit any of the changes for them, but I don't care too much either way. Mostly just curious if you had a compelling reason for it. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Most of them don't need to be public, but there are scenarios where thing is private on one platform but public on the other, so having a lint on all the time gets complicated. I enabled the lint, made a lot of things private to the point that dealing with the rest required adding exceptions and disabled the lint back again.
|
So I ended up enabling the lint explicitly on Windows and Linux. This way stuff not used by obscure platforms that still needs to be public can stay public. As for removing changes to files where the lint is not enforced - I think there are benefits to leave them as is - the goal is to have less stuff public after all. |
|
Making some of the |
|
Hmmm... Well, this PR started after I noticed some Every To break the code something needs to be used privately on both Linux and Windows, but needs to be visible outside of the crate via I did this and don't see any. Are there any specific scenarios you are worried about? |
warn(unreachable_pub)warn(unreachable_pub)So now this commit just tightens the current visibility without trying to enforce it.
View all comments
r? clarfonthey